	$(function () {
		$("#sendMail-btn").bind("click",function(){
		    var tag_id = $("#tag_id").val();
		    sendMail(tag_id);
		});
		$("#gongshijisuan-btn").bind("click",function(){
		    gongshijisuan();
		});
		$("#meirijiancha-btn").bind("click",function(){
		    meirijiancha();
		});
	});
    function sendMail(tag_id){
        var crfrom = $("#crfrom").val();
        var dataObj = null;
        if(crfrom == 1) {
            var calDate = $("#calDate").val();
            var days =  $("#days").val();
            dataObj = {'tag_id':tag_id, 'crfrom':crfrom, 'days':days, 'calDate':calDate };
        } else {
            dataObj = {'tag_id':tag_id, 'crfrom':crfrom };
        }
        $.ajax({
             type: "GET",
             url: "/api/zantao/sendMail",
             data: dataObj,
             dataType: "json",
             success: function(data) {
                if(data.code == 200) {
                    alert("操作成功");
                }
             }
        });
    }

    function gongshijisuan(){
        $.ajax({
             type: "GET",
             url: "/api/zantao/gongshijisuanApi",
             data: {},
             dataType: "json",
             success: function(data){
                if(data.code == 200){
                    alert("操作成功");
                }
             }
        });
    }

    function meirijiancha(){
        $.ajax({
             type: "GET",
             url: "/api/zantao/meirijianchaApi",
             data: {},
             dataType: "json",
             success: function(data){
                if(data.code == 200){
                    alert("操作成功");
                }
             }
        });
    }